// import { configureStore } from '@reduxjs/toolkit'
// import { persistStore, persistReducer } from 'redux-persist'
// import storage from 'redux-persist/lib/storage'

// import rootReducer from './reducer'

// // 定义持久化配置
// const persistConfig = { key: 'root', storage }
// // 创建持久化reducer
// const persistedReducer = persistReducer(persistConfig, rootReducer)
// // 创建Redux store
// const store = configureStore({
//   reducer: persistedReducer,
//   // 解决了序列化问题
//   middleware: (getDefaultMiddleware) => getDefaultMiddleware({ serializableCheck: false })
// })
// // 创建持久化存储器
// const persistor = persistStore(store)
// export { store, persistor }
